"""
alembic数据库迁移工具
"""

import os
import sys

path = os.path.dirname(__file__)
sys.path.append(os.path.join(path, '..'))

from sqlalchemy import Column, Integer, String
from conf.mysql_config import BASE


class AlembicTestOrm(BASE):
    __tablename__ = 'alembic_test'
    id = Column(Integer, autoincrement=True, primary_key=True)
    name = Column(String(30), comment='姓名', doc={'zh': '姓名'})

    def __str__(self):
        return f'<AlembicTestOrm id={self.id}, name={self.name}>'


BASE.metadata.create_all()
